package com.rdzn.mall.center.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.rdzn.mall.center.entity.SmsHomeAdvertise;
import com.rdzn.mall.center.mapper.SmsHomeAdvertiseMapper;
import com.rdzn.mall.center.service.ISmsHomeAdvertiseService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: sms_home_advertise
 * @Author: jeecg-boot
 * @Date:   2020-08-27
 * @Version: V1.0
 */

@Service
public class SmsHomeAdvertiseServiceImpl extends ServiceImpl<SmsHomeAdvertiseMapper, SmsHomeAdvertise> implements ISmsHomeAdvertiseService {

    @Override
    public List<SmsHomeAdvertise> getList() {
        return list(new LambdaQueryWrapper<SmsHomeAdvertise>().eq(SmsHomeAdvertise::getType, 1).eq(SmsHomeAdvertise::getStatus, 1)
                .orderByDesc(SmsHomeAdvertise::getSort));
    }
}
